import req from "@/utils/request";
// import service from "@/utils/request";
let { request, service, upload } = req;

// 登录
export function doLogin(params) {
  return request("/sjw_department_control/acc/doLogin", "post", {
    params,
  });
}

//愉快政登录 获取token
export function login(params) {
  return request("/cq-user-center/login", "post", { params });
}

// 获取验证码
export function captchaImage(params) {
  return request("/sjw_department_control/captcha/captchaImage", "get", {
    params,
  });
}

// 心理健康
export function mentaHeath(params) {
  return request("/sjw_department_control/students/mentaHeath", "post", {
    params,
  });
}

// 心理健康详情
export function mentaHeathDetail(params) {
  return request("/sjw_department_control/students/mentaHeathDetail", "post", {
    params,
  });
}

// 视力健康
export function visionHeath(params) {
  return request("/sjw_department_control/students/visionHeath", "post", {
    params,
  });
}

// 视力健康详情
export function visionHeathDetail(params) {
  return request("/sjw_department_control/students/visionHeathDetail", "post", {
    params,
  });
}

// 体质健康
export function physicalHealth(params) {
  return request("/sjw_department_control/students/physicalHealth", "post", {
    params,
  });
}

// 体质健康详情
export function physicalHealthDetail(params) {
  return request(
    "/sjw_department_control/students/physicalHealthDetail",
    "post",
    {
      params,
    }
  );
}

// 二级
//电脑端点击量折线图
export function sat() {
  return request("/cq-user-center/click/sat", "post", {});
}

//驾驶舱2.0数据
export function event_info(params) {
  return request("/sjw_department_control/jyzz/event-info", "post", { params });
}

//多跨事件列表
export function event_details(params) {
  return request("/sjw_department_control/jyzz/event-details", "post", {
    params,
  });
}

//在校学生性别结构
export function students_periodGender(params) {
  return request("/sjw_department_control/students/periodGender", "post", {
    params,
  });
}

//在校学生城乡结构
export function students_town(params) {
  return request("/sjw_department_control/students/town", "post", {
    params,
  });
}

//在校学生明细（区县+学段）
export function students_studentDetail(params) {
  return request("/sjw_department_control/students/studentDetail", "post", {
    params,
  });
}

//在校学生结构（按学段）
export function students_periodStudent(params) {
  return request("/sjw_department_control/students/periodStudent", "post", {
    params,
  });
}

// Dify-AI获取应用参数
export function parameters() {
  return request(
    "/v1/parameters",
    "get",
    {},
    {
      Authorization: "Bearer app-C3wwvpWnWikES8xROPaBbIgd",
    }
  );
}

// 验证token
export function getisLogin(params) {
  return request("/sjw_department_control/acc/isLogin", "post", {
    params,
  });
}

// 验证token
export function authSzqs(params) {
  return service.post("/sjw_department_control/authClient/authHxs", params);
}

//获取用户信息
export function userInfo(params) {
  return request("/sjw_department_control/acc/userInfo", "post", { params });
}

//区县驾驶舱
export function districtCockkpit(data) {
  return request(
    "/sjw_department_control/eduCockpit/districtCockkpit",
    "post",
    {
      data,
    }
  );
}

// 区县列表
export function OneForm_countyList(params) {
  return request("/sjw_department_control/OneForm/countyList", "post", {
    params,
  });
}

// 区县列表
export function level(params) {
  return request("/sjw_department_control/district/level", "post", {
    params,
  });
}